Exit
An Exit statement is used in a Repeat statement to exit the Repeat statement. When AppleScript executes an Exit statement, it terminates loop execution and resumes execution with the next statement following the Repeat statement. You cannot use Exit statements outside of Repeat statements.SYNTAX
exitEXAMPLE
set i to 1 tell application "Scriptable Text Editor" repeat if i > (count windows) exit end print window i set i to i + 1 end repeat end tell